package com.aires.testloopdependency;

import com.aires.testloopdependency.service.IndexService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MainClass {
	public static void main(String[] args) {

		// 实例化ApplicationContext容器
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MainConfig.class);

//		context.setAllowCircularReferences(false);
//		context.register(MainConfig.class);
//		context.refresh();
		IndexService indexService = context.getBean(IndexService.class);
		System.out.println(indexService);
	}
}
